package com.yantong.mapper;

import com.yantong.pojo.MarketingGroup;
import com.yantong.pojo.MarketingGroupExample;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;

import java.util.List;
import java.util.Map;

public interface MarketingGroupMapper {
	long countByExample(MarketingGroupExample example);

	int deleteByExample(MarketingGroupExample example);

	int insert(MarketingGroup record);

	int insertSelective(MarketingGroup record);

	MarketingGroup getMarketingGroupByProductId(Long productId);

	MarketingGroup getMarketingGroupById(Long id);

	List<MarketingGroup> selectByExample(MarketingGroupExample example);

	List<MarketingGroup> selectByExample(MarketingGroupExample example, RowBounds rowBounds);

	int updateByExampleSelective(@Param("record") MarketingGroup record, @Param("example") MarketingGroupExample example);

	int updateByExample(@Param("record") MarketingGroup record, @Param("example") MarketingGroupExample example);

	int changeStock(@Param("total") Integer total, @Param("activityId") Long activityId);

	int count(Map<String, Object> paramMap);

	List<MarketingGroup> selectByCondition(Map<String, Object> paramMap, RowBounds rowBounds);

	int updateIsNull(@Param("id") Long id);

}